Refactor gccForLibs so gcc isn't inadvertently compiled#100686
Refactor gccForLibs so gcc isn't inadvertently compiled#100686spease wants to merge 1 commit intoNixOS:masterfrom
Conversation
SuperSandro2000
left a comment
There was a problem hiding this comment.
Please fix the eval error. Maybe a rebase helps?
|
I’m not doing any more nix work on my work machine (which is presently the only active Mac computer I have). The team I work with decided to stop using nix due to the difficulty of learning it and broken packages (primarily halide and nix-xcodeenv) I encountered with the proof of concept. Two people also heard a horror story and negative feedback from their networks as well that seemed to line up with my experience. |
|
I guess this can be closed then? |
|
Well, I have a personal mac now, but I don't understand the error. I don't see anywhere that I used anything called restrict-eval? |
|
@ofborg eval |
| then targetPackages.stdenv.cc.cc | ||
| else gcc.cc; | ||
| else gcc.cc | ||
| else null; |
There was a problem hiding this comment.
I think this is causing the eval error. The package should never be null.
There was a problem hiding this comment.
Got it, that's tricky. Would the idiomatic thing be to mark gcc as broken and then check for that rather than its nullness?
There was a problem hiding this comment.
Marking something broken based on targetPlatform sounds weird to me.
There was a problem hiding this comment.
Well, as far as I know, that is what's going on - gcc is broken on macOS. Or at least, that's what I thought back in October...
|
PR #110101 may supercede this. Both fixes in that are required for iOS to work (bootstrap?). The gccForLibs change has a similar effect as this one, it's just simpler. |
|
Let's land #110251, and then revisit this. I think the way the conditions are written can be improved, but after I broke things on the last attempt, I want to do this in multiple steps. |
|
OK #110251 is merged. I agree with @SuperSandro2000 that the package shouldn't be null on the top level. But cc-wrapper should be smarter about "gcc for libgcc and friends" vs "gcc for libstdc++". If you want to take a stab at that, that would be much appreciated! |
|
I marked this as stale due to inactivity. → More info |
Motivation for this change
(I believe) gccForLibs was written in such a way that it would pull in GCC on darwin. This change is from a few days ago, and I'm relatively new to nix.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)